Integrand size = 26, antiderivative size = 166 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=\frac {x}{a^2 c^4}+\frac {\cot (e+f x)}{a^2 c^4 f}-\frac {\cot ^3(e+f x)}{3 a^2 c^4 f}+\frac {\cot ^5(e+f x)}{5 a^2 c^4 f}-\frac {2 \cot ^7(e+f x)}{7 a^2 c^4 f}+\frac {2 \csc (e+f x)}{a^2 c^4 f}-\frac {2 \csc ^3(e+f x)}{a^2 c^4 f}+\frac {6 \csc ^5(e+f x)}{5 a^2 c^4 f}-\frac {2 \csc ^7(e+f x)}{7 a^2 c^4 f} \]
x/a^2/c^4+cot(f*x+e)/a^2/c^4/f-1/3*cot(f*x+e)^3/a^2/c^4/f+1/5*cot(f*x+e)^5 /a^2/c^4/f-2/7*cot(f*x+e)^7/a^2/c^4/f+2*csc(f*x+e)/a^2/c^4/f-2*csc(f*x+e)^ 3/a^2/c^4/f+6/5*csc(f*x+e)^5/a^2/c^4/f-2/7*csc(f*x+e)^7/a^2/c^4/f
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 2.25 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.49 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=-\frac {\cot ^7(e+f x) \left (5+5 \operatorname {Hypergeometric2F1}\left (-\frac {7}{2},1,-\frac {5}{2},-\tan ^2(e+f x)\right )+70 \sec (e+f x)-140 \sec ^3(e+f x)+112 \sec ^5(e+f x)-32 \sec ^7(e+f x)\right )}{35 a^2 c^4 f} \]
-1/35*(Cot[e + f*x]^7*(5 + 5*Hypergeometric2F1[-7/2, 1, -5/2, -Tan[e + f*x ]^2] + 70*Sec[e + f*x] - 140*Sec[e + f*x]^3 + 112*Sec[e + f*x]^5 - 32*Sec[ e + f*x]^7))/(a^2*c^4*f)
Time = 0.49 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.88, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3042, 4392, 3042, 4374, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{(a \sec (e+f x)+a)^2 (c-c \sec (e+f x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2 \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 4392 |
\(\displaystyle \frac {\int \cot ^8(e+f x) (\sec (e+f x) a+a)^2dx}{a^4 c^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^2}{\cot \left (e+f x+\frac {\pi }{2}\right )^8}dx}{a^4 c^4}\) |
\(\Big \downarrow \) 4374 |
\(\displaystyle \frac {\int \left (a^2 \cot ^8(e+f x)+2 a^2 \csc (e+f x) \cot ^7(e+f x)+a^2 \csc ^2(e+f x) \cot ^6(e+f x)\right )dx}{a^4 c^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {2 a^2 \cot ^7(e+f x)}{7 f}+\frac {a^2 \cot ^5(e+f x)}{5 f}-\frac {a^2 \cot ^3(e+f x)}{3 f}+\frac {a^2 \cot (e+f x)}{f}-\frac {2 a^2 \csc ^7(e+f x)}{7 f}+\frac {6 a^2 \csc ^5(e+f x)}{5 f}-\frac {2 a^2 \csc ^3(e+f x)}{f}+\frac {2 a^2 \csc (e+f x)}{f}+a^2 x}{a^4 c^4}\) |
(a^2*x + (a^2*Cot[e + f*x])/f - (a^2*Cot[e + f*x]^3)/(3*f) + (a^2*Cot[e + f*x]^5)/(5*f) - (2*a^2*Cot[e + f*x]^7)/(7*f) + (2*a^2*Csc[e + f*x])/f - (2 *a^2*Csc[e + f*x]^3)/f + (6*a^2*Csc[e + f*x]^5)/(5*f) - (2*a^2*Csc[e + f*x ]^7)/(7*f))/(a^4*c^4)
3.1.29.3.1 Defintions of rubi rules used
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[Cot[e + f*x]^(2*m)*( c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] && !( IntegerQ[n] && GtQ[m - n, 0])
Time = 0.72 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.55
method | result | size |
parallelrisch | \(\frac {-15 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}+147 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}+35 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}-770 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+3360 f x -735 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+4410 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )}{3360 f \,a^{2} c^{4}}\) | \(91\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {1}{7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}+\frac {7}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}-\frac {22}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {42}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}+64 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{32 f \,c^{4} a^{2}}\) | \(101\) |
default | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {1}{7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}+\frac {7}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}-\frac {22}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {42}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}+64 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{32 f \,c^{4} a^{2}}\) | \(101\) |
risch | \(\frac {x}{a^{2} c^{4}}+\frac {2 i \left (210 \,{\mathrm e}^{9 i \left (f x +e \right )}-315 \,{\mathrm e}^{8 i \left (f x +e \right )}-420 \,{\mathrm e}^{7 i \left (f x +e \right )}+1470 \,{\mathrm e}^{6 i \left (f x +e \right )}-504 \,{\mathrm e}^{5 i \left (f x +e \right )}-1204 \,{\mathrm e}^{4 i \left (f x +e \right )}+1108 \,{\mathrm e}^{3 i \left (f x +e \right )}+258 \,{\mathrm e}^{2 i \left (f x +e \right )}-554 \,{\mathrm e}^{i \left (f x +e \right )}+191\right )}{105 f \,c^{4} a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{7} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}\) | \(149\) |
norman | \(\frac {\frac {x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{c a}-\frac {1}{224 a c f}+\frac {7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{160 a c f}-\frac {11 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{48 a c f}+\frac {21 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{16 a c f}-\frac {7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{32 a c f}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}}{96 a c f}}{a \,c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}\) | \(160\) |
1/3360*(-15*cot(1/2*f*x+1/2*e)^7+147*cot(1/2*f*x+1/2*e)^5+35*tan(1/2*f*x+1 /2*e)^3-770*cot(1/2*f*x+1/2*e)^3+3360*f*x-735*tan(1/2*f*x+1/2*e)+4410*cot( 1/2*f*x+1/2*e))/f/a^2/c^4
Time = 0.26 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=\frac {191 \, \cos \left (f x + e\right )^{5} - 172 \, \cos \left (f x + e\right )^{4} - 253 \, \cos \left (f x + e\right )^{3} + 258 \, \cos \left (f x + e\right )^{2} + 105 \, {\left (f x \cos \left (f x + e\right )^{4} - 2 \, f x \cos \left (f x + e\right )^{3} + 2 \, f x \cos \left (f x + e\right ) - f x\right )} \sin \left (f x + e\right ) + 87 \, \cos \left (f x + e\right ) - 96}{105 \, {\left (a^{2} c^{4} f \cos \left (f x + e\right )^{4} - 2 \, a^{2} c^{4} f \cos \left (f x + e\right )^{3} + 2 \, a^{2} c^{4} f \cos \left (f x + e\right ) - a^{2} c^{4} f\right )} \sin \left (f x + e\right )} \]
1/105*(191*cos(f*x + e)^5 - 172*cos(f*x + e)^4 - 253*cos(f*x + e)^3 + 258* cos(f*x + e)^2 + 105*(f*x*cos(f*x + e)^4 - 2*f*x*cos(f*x + e)^3 + 2*f*x*co s(f*x + e) - f*x)*sin(f*x + e) + 87*cos(f*x + e) - 96)/((a^2*c^4*f*cos(f*x + e)^4 - 2*a^2*c^4*f*cos(f*x + e)^3 + 2*a^2*c^4*f*cos(f*x + e) - a^2*c^4* f)*sin(f*x + e))
\[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=\frac {\int \frac {1}{\sec ^{6}{\left (e + f x \right )} - 2 \sec ^{5}{\left (e + f x \right )} - \sec ^{4}{\left (e + f x \right )} + 4 \sec ^{3}{\left (e + f x \right )} - \sec ^{2}{\left (e + f x \right )} - 2 \sec {\left (e + f x \right )} + 1}\, dx}{a^{2} c^{4}} \]
Integral(1/(sec(e + f*x)**6 - 2*sec(e + f*x)**5 - sec(e + f*x)**4 + 4*sec( e + f*x)**3 - sec(e + f*x)**2 - 2*sec(e + f*x) + 1), x)/(a**2*c**4)
Time = 0.28 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.01 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=-\frac {\frac {35 \, {\left (\frac {21 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2} c^{4}} - \frac {6720 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2} c^{4}} - \frac {{\left (\frac {147 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {770 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {4410 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - 15\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{7}}{a^{2} c^{4} \sin \left (f x + e\right )^{7}}}{3360 \, f} \]
-1/3360*(35*(21*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a^2*c^4) - 6720*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/(a^2 *c^4) - (147*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 770*sin(f*x + e)^4/(cos (f*x + e) + 1)^4 + 4410*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 - 15)*(cos(f*x + e) + 1)^7/(a^2*c^4*sin(f*x + e)^7))/f
Time = 0.36 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.73 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=\frac {\frac {3360 \, {\left (f x + e\right )}}{a^{2} c^{4}} + \frac {4410 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 770 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 147 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 15}{a^{2} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7}} + \frac {35 \, {\left (a^{4} c^{8} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 21 \, a^{4} c^{8} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{6} c^{12}}}{3360 \, f} \]
1/3360*(3360*(f*x + e)/(a^2*c^4) + (4410*tan(1/2*f*x + 1/2*e)^6 - 770*tan( 1/2*f*x + 1/2*e)^4 + 147*tan(1/2*f*x + 1/2*e)^2 - 15)/(a^2*c^4*tan(1/2*f*x + 1/2*e)^7) + 35*(a^4*c^8*tan(1/2*f*x + 1/2*e)^3 - 21*a^4*c^8*tan(1/2*f*x + 1/2*e))/(a^6*c^12))/f
Time = 14.11 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.11 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^4} \, dx=\frac {35\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-735\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4410\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-770\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+147\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3360\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (e+f\,x\right )}{3360\,a^2\,c^4\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7} \]
(35*sin(e/2 + (f*x)/2)^10 - 15*cos(e/2 + (f*x)/2)^10 - 735*cos(e/2 + (f*x) /2)^2*sin(e/2 + (f*x)/2)^8 + 4410*cos(e/2 + (f*x)/2)^4*sin(e/2 + (f*x)/2)^ 6 - 770*cos(e/2 + (f*x)/2)^6*sin(e/2 + (f*x)/2)^4 + 147*cos(e/2 + (f*x)/2) ^8*sin(e/2 + (f*x)/2)^2 + 3360*cos(e/2 + (f*x)/2)^3*sin(e/2 + (f*x)/2)^7*( e + f*x))/(3360*a^2*c^4*f*cos(e/2 + (f*x)/2)^3*sin(e/2 + (f*x)/2)^7)